package com.mydesign.demo.controller;

import com.mydesign.demo.model.ReturnResult;
import com.mydesign.demo.service.WxUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/user")
public class WxUserController {
    @Autowired
    WxUserService wxUserService;

    @PostMapping("/getWxUserOpenid")
    public ReturnResult WxUserRegister(HttpServletRequest request) {
        return wxUserService.WxUserRegister(request);
    }

    @PostMapping("/editUserInformation")
    public ReturnResult editUserInformation(HttpServletRequest request) {
        return wxUserService.editUserInformation(request);
    }
    @GetMapping("/selectUser")
    public ReturnResult selectUser(HttpServletRequest request){
        return wxUserService.selectUser(request);
    }
}